package cn.io1;


import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

public class Test05 {
    public static void main(String[] args) {
        try (
            InputStreamReader isr = new InputStreamReader(new FileInputStream("move/gb18230.txt"));
            InputStreamReader isr2 = new InputStreamReader(new FileInputStream("move/gb18230.txt"), "gbk")
        ){
            int len;
            while ((len = isr.read())!=-1){
                System.out.print((char)len);
            }
            System.out.println();
            System.out.println("---------");
            int len2;
            while ((len2 = isr2.read())!=-1){
                System.out.print((char)len2);
            }
            System.out.println();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
